clc,clear;
filename1 = 'C:\Users\caoshuqiang\Desktop\rem\lena-dual-stripe1.rem';   
filename2 = 'C:\Users\caoshuqiang\Desktop\rem\lena-dual-stripe10.rem';
filename3 = 'C:\Users\caoshuqiang\Desktop\rem\lena-dual-stripe20.rem';
filename4 = 'C:\Users\caoshuqiang\Desktop\rem\lena-dual-stripe30.rem';

huatu(filename1);
huatu(filename2);
huatu(filename3);
huatu(filename4);
legend('rem1','rem10','rem20','rem30');



function []=huatu(filename)
h = fopen(filename);
C = fscanf(h,'%f');
fclose(h);
N = length(C);
X = zeros(1,N/4);
Y = zeros(1,N/4);
Z = zeros(1,N/4);
snr = zeros(1,N/4);
SNR = zeros(1,N/4);
j=0;k=0;l=0;m=0;
for i=1:1:N
    a = mod(i,4);
    switch a
        case 1
            j=j+1;
            X(j)=C(i,1);
            
        case 2
            k=k+1;
            Y(k)=C(i,1);
            
        case 3
            l=l+1;
            Z(l)=C(i,1);
            
        case 0
            m=m+1;
            snr(m)=C(i,1);
            SNR(m)=10*log10(C(i,1));
            
    end
end
hold on;
plot(Y(1601:1700),SNR(1601:1700));
end